<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Object.is() 与 === 的区别是什么</title>
</head>

<body>
    <script>
        // Object.is() 与 === 的区别是什么
        console.log(NaN === NaN) //false
        console.log(+0 === -0) //true
        console.log(Object.is(NaN, NaN)); //true
        console.log(Object.is(+0, -0)); //false
    </script>
</body>

</html>